# load packages

pacman::p_load(tidyverse, fixest)

### table A.5 (pool visitorship and perceptions of diversity) ----

# load data
pools <- read_rds("data/survey.rds")

# run regressions
m1 <- feols(estimate_foreigners_county ~ pool_visitor +
                as.numeric(age) + factor(male) + factor(education) + factor(family_status) +
                factor(religious) + factor(parents_born_in_ger) | zip, data = pools)

m2 <- feols(estimate_foreigners_neighborhood ~ pool_visitor +
                as.numeric(age) + factor(male) + factor(education) + factor(family_status) +
                factor(religious) + factor(parents_born_in_ger) | zip, data = pools)

summary(m1)
summary(m2)

# clean
rm(list = ls())